{% extends 'layout.html' %}
{% block title %}{{ station.station_name }}{% endblock %}
{% block content %}
<div class="row">
    <div class="col" align="center">
        <p><h3>{{station.station_name}}</h3></p>
        <form action="/aibox_update/{{station.station_id}}/" method="POST" id="aibox_create">
            {% csrf_token %}
            <input type="hidden" name="station_id" value="{{station.station_id}}">
            <table class="table table-striped">
                <tr>
                    <td>{{form.aibox_type.label_tag}}</td>
                    <td>{{form.aibox_type}}</td>
                </tr>
                <tr>
                    <td>{{ form.aibox_sn.label_tag }}</td>
                    <td>{{ form.aibox_sn }}</td>
                </tr>
                <tr>
                    <td>{{ form.aibox_url.label_tag }}</td>
                    <td>{{ form.aibox_url }}</td>
                </tr>
                <tr>
                    <td>{{ form.ai_inspect.label_tag }}</td>
                    <td>{{form.ai_inspect}}</td>
                </tr>
                <tr>
                    <td>监控通道</td>
                    <td>
                        {% if channels %}
                        <select class="form-control" name="monitor_channel">
                            <option value="{{monitor_channel.channel_number}}">{{monitor_channel.channel_number}}-{{monitor_channel.channel_name}}</option>
                            {% for channel in channels %}
                                <option value="{{channel.channel_number}}">{{channel.channel_number}}-{{channel.channel_name}}</option>
                            {% endfor %}
                        </select>
                        {% endif %}
                    </td>
                </tr>
                <tr>
                    <td><button type="reset" class="btn btn-danger btn-block">重置</button></td>
                    <td><button type="submit" class="btn btn-primary btn-block">提交</button></td>
                </tr>
            </table>
        </form>
    </div>
</div>
{% endblock %}